% V20210224 - 9.1.1 GW_CHECKBOX_CHECKED INCLUDE "GW.bas" CrLf$ = CHR$(13) + CHR$(10) % Create a page. p = GW_NEW_PAGE() % Prepare title bar string. Title$ = GW_ADD_BAR_TITLE$("Checkbox Example") % Add title to page. GW_ADD_TITLEBAR(p, Title$) % Add descriptive text. TB = GW_ADD_TEXT(p, "This is an example of the CHECKBOX control:") % Now add the control. C1 = GW_ADD_CHECKBOX(p, "Let's check on this.") % And add the next control. C2 = GW_ADD_CHECKBOX(p, ">This one is checked.") % Add a button control. GW_ADD_BUTTON(p, "What is checked?", "Check") % Add a text box for the results. TB = GW_ADD_TEXTBOX(p, "") % Now show the page. GW_RENDER(p) DO % Wait for user action. r$ = GW_WAIT_ACTION$() % Place here any necessary code to process user actions. % Example feedback. POPUP r$ IF r$ = "Check" GW_MODIFY(TB, "text", ~ "First checkbox = " + ~ INT$(GW_CHECKBOX_CHECKED(C1)) ~ + CrLf$ + ~ "Second checkbox = " + ~ INT$(GW_CHECKBOX_CHECKED(C2))) ENDIF % End when BACK key is pressed. UNTIL r$ = "BACK" END "End of Checkbox example."